]> dgit.raspbian.org Git - gnome-shell.git/log
gnome-shell.git
6 years agodateMenu: Skip weather forecast if not valid
Philip Chimento [Tue, 19 Nov 2019 21:31:57 +0000 (13:31 -0800)]
dateMenu: Skip weather forecast if not valid

GWeather.Info.get_value_update() may indicate that the forecast is not
valid, or it may return a timestamp of 0 to indicate the information has
never been updated. In both of these cases, skip creating a widget for
it, as the information will not be accurate.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/835

6 years agodateMenu: Format weather forecast times without AM/PM
Philip Chimento [Tue, 19 Nov 2019 21:15:34 +0000 (13:15 -0800)]
dateMenu: Format weather forecast times without AM/PM

If the clock is set to 12h, the AM/PM in the weather forecast times
should be clear from the context, because they are the immediately
following hours. This makes it less likely that the times will be
ellipsized (in which case the AM/PM wouldn't be shown anyway.)

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/835

6 years agoIncrease .calendar-today visibility
cunidev [Wed, 20 Nov 2019 07:13:36 +0000 (08:13 +0100)]
Increase .calendar-today visibility

Adds some needed contrast to the calendar widget current day, solving #1873.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/823

6 years agoappMenu: Hide stopped spinner actor
Joonas Henriksson [Mon, 18 Nov 2019 20:25:59 +0000 (22:25 +0200)]
appMenu: Hide stopped spinner actor

Get rid of leftover empty space from the application menu panel
button, that was used by the spinner actor, which remained visible
even after the spinner had stopped.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1679
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/832

6 years agoanimation: Add parameter for hiding stopped Spinner actor
Joonas Henriksson [Mon, 18 Nov 2019 20:24:05 +0000 (22:24 +0200)]
animation: Add parameter for hiding stopped Spinner actor

Not hiding leaves the empty actor space visible, which may have an
undesirable effect on the parent element's size or spacing/padding.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/832

6 years agoanimation: Turn Spinner animate parameter into Params option
Joonas Henriksson [Mon, 18 Nov 2019 20:18:29 +0000 (22:18 +0200)]
animation: Turn Spinner animate parameter into Params option

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/832

6 years agoUpdate Friulian translation
Fabio Tomat [Mon, 18 Nov 2019 08:56:08 +0000 (08:56 +0000)]
Update Friulian translation

6 years agokeyboard: Try harder to find a matching layout
Florian Müllner [Sat, 16 Nov 2019 12:48:35 +0000 (13:48 +0100)]
keyboard: Try harder to find a matching layout

While we support a reasonable list of layouts nowadays, we don't
include many variants like `fr+oss`. Instead of directly falling
back to the `us` layout, try stripping the variant first, as the
base layout is likely closer to the expectation than `us`.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1907

6 years agopolkitAgent: Cancel session after disconnecting signal handlers
Jonas Dreßler [Sun, 23 Jun 2019 11:11:58 +0000 (13:11 +0200)]
polkitAgent: Cancel session after disconnecting signal handlers

When cancelling the PolkitAgent session before disconnecting the signal
handlers, we receive a "completed" signal where `gained_authorization`
is set to FALSE, which means we show an error message inside
`_onSessionCompleted()`.

This in turn means we show an error message every time we cancel a
session. In practice this wasn't really relevant so far since we only
destroyed the session when an actual error occurred before. Now that the
dialog supports empty passwords, we also call `_destroySession()` when
the user changes and no longer has a password set, and in this case we
want to cancel the current session without showing an error message.

So to fix this, disconnect the signal handlers before cancelling the
session, which makes sure we don't receive the last "completed" signal
in case we cancelled the session ourselves. This change also allows
removing `this._wasDismissed`.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/829

6 years agopolkitAgent: Use dialog as confirmation when the user has no password
Joaquim Rocha [Sun, 23 Jun 2019 10:32:35 +0000 (12:32 +0200)]
polkitAgent: Use dialog as confirmation when the user has no password

When a user has no password and a polkit authentication is started,
instead of blindly initiating the admin session, show the regular
"Authentication Requested" dialog (but without the password entry). This
makes sure that the user's admin session is only effectively started
after the user chooses to proceed with the authentication, which
provides an extra confirmation step that can be vital for critical
tasks.

To do this, we show the dialog inside `_onUserChanged()` right after the
dialog was created instead of calling `performAuthentication()` from
`_onInitiate()`. The bug mentioned in `_onInitiate()` is no longer an
issue since we show the dialog in all cases now anyway.

Ideally we should use a different wording than "authentication" when the
user has no password set, and use "confirmation" instead. However polkit
already sends the requests with such messages (e.g. "Authentication is
required to configure software repositories"), and it's important to
show those to the user, so this patch keeps the regular wording.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/829

6 years agopolkitAgent: Only reset UI on session resets while opened
Jonas Dreßler [Thu, 14 Nov 2019 17:51:01 +0000 (18:51 +0100)]
polkitAgent: Only reset UI on session resets while opened

Since `_destroySession()` is not only called before we try to initiate a
new authentication session with Polkit, but also when the dialog is
closed, it's currently possible that key focus is grabbed by the close
button after the dialog was dismissed and hidden. This is causing a bug
where after dismissing one of multiple queued dialogs, key focus goes
away and keyboard navigation with the new dialog is impossible.

Fix this by only resetting the UI of the dialog if the dialog is still
opened/visible at that point.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/828

6 years agopanel: Don't chain up to non-existent parent vfunc
Jonas Dreßler [Mon, 4 Nov 2019 10:18:25 +0000 (11:18 +0100)]
panel: Don't chain up to non-existent parent vfunc

Just as with c35b4cede58142797b1f6b04a4e2e7eaa938234a, there's no
default vfunc implemented by any parent which causes gjs to crash when
trying to call it.

So return EVENT_STOP if the key press successfully toggled the button,
and EVENT_PROPAGATE otherwise.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/830

6 years agoStop referring to ClutterTexture
Jonas Ådahl [Tue, 12 Nov 2019 18:43:38 +0000 (19:43 +0100)]
Stop referring to ClutterTexture

ClutterTexture is removed from mutter's clutter fork, so lets stop
referring to it. This also happens to fix an incorrect type cast.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/822

6 years agobackground: Add exception to no-loop-func rule
Florian Müllner [Sun, 15 Sep 2019 00:51:40 +0000 (02:51 +0200)]
background: Add exception to no-loop-func rule

Modifying variables from an outer scope in functions created in a loop
is considered problematic by eslint, because the variable value in the
resulting closure is often not what the coder intended.

In this particular case however, the scoping is correct, so add a comment
to disable the rule locally.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/818

6 years agostyle: Allow lonely ifs where appropriate
Florian Müllner [Tue, 20 Aug 2019 02:24:37 +0000 (04:24 +0200)]
style: Allow lonely ifs where appropriate

We now have a lint rule to disallow lonely ifs, however there are
cases where the "lonely" part mirrors code from the preceding if
clause. Opt out of the lint rule in those cases.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/818

6 years agolint: Disable eqeqeq in legacy configuration
Florian Müllner [Tue, 20 Aug 2019 20:18:04 +0000 (22:18 +0200)]
lint: Disable eqeqeq in legacy configuration

Using type-safe comparisons is a good idea, but after not doing so
for a decade, there's too much existing code around for flipping
the switch right away.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/818

6 years agolint: Sync configuration with gjs
Florian Müllner [Mon, 19 Aug 2019 17:28:51 +0000 (19:28 +0200)]
lint: Sync configuration with gjs

gjs updates its configuration to a much more complete and
thorough set, follow suite.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/818

6 years agolint: Convert eslint JSON to YAML
Florian Müllner [Mon, 19 Aug 2019 17:20:55 +0000 (19:20 +0200)]
lint: Convert eslint JSON to YAML

gjs has changed its configuration to YAML, so switch to that format
to keep syncing possible.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/818

6 years agofolderView: Center folder icon
Georges Basile Stavracas Neto [Mon, 11 Nov 2019 21:07:19 +0000 (18:07 -0300)]
folderView: Center folder icon

The FolderView class is responsible for creating the 4-item
grid of the folder icon, with the preview of the first four
apps inside the folder.

However, with the deprecation of StAlign as child properties,
the folder icon stopped being horizontally centralized.

Center the folder icon horizontally again.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/817

6 years agocleanup: Use JSDoc for documentation comments
Florian Müllner [Thu, 17 Oct 2019 16:41:52 +0000 (18:41 +0200)]
cleanup: Use JSDoc for documentation comments

It's a better fit than gtk-doc, and eslint can validate that they
are complete and use correct syntax.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805

6 years agocleanup: Don't use gtk-doc syntax for regular comments
Florian Müllner [Thu, 17 Oct 2019 17:49:18 +0000 (19:49 +0200)]
cleanup: Don't use gtk-doc syntax for regular comments

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805

6 years agocleanup: Avoid unnecessary parentheses
Florian Müllner [Mon, 19 Aug 2019 19:38:51 +0000 (21:38 +0200)]
cleanup: Avoid unnecessary parentheses

Extra parentheses usually add noise rather than clarity, so avoid
them.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805

6 years agocleanup: Require "dangling" commas
Florian Müllner [Tue, 20 Aug 2019 21:43:54 +0000 (23:43 +0200)]
cleanup: Require "dangling" commas

Since ES5, trailing commas in arrays and object literals are valid.
We generally haven't used them so far, but they are actually a good
idea, as they make additions and removals in diffs much cleaner.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805

6 years agocleanup: Only omit braces for single-line blocks
Florian Müllner [Tue, 20 Aug 2019 00:51:42 +0000 (02:51 +0200)]
cleanup: Only omit braces for single-line blocks

Braces can be avoided when a block consists of a single statement,
but readability suffers when the statement spans more than a single
line.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805

6 years agocleanup: Use object shorthand where possible
Florian Müllner [Mon, 19 Aug 2019 19:06:04 +0000 (21:06 +0200)]
cleanup: Use object shorthand where possible

ES6 allows to omit property names where they match the name of the
assigned variable, which makes code less redunant and thus cleaner.
We will soon enforce that in our eslint rules, so make sure we use
the shorthand wherever possible.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805

6 years agocleanup: Fix missing/stray spaces
Florian Müllner [Mon, 19 Aug 2019 17:55:49 +0000 (19:55 +0200)]
cleanup: Fix missing/stray spaces

Those are wrong according to our style guidelines, but the previous
eslint ruleset didn't catch them.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805

6 years agocleanup: Don't shadow variables
Florian Müllner [Tue, 20 Aug 2019 00:20:08 +0000 (02:20 +0200)]
cleanup: Don't shadow variables

Having variables that share the same name in overlapping scopes is
confusing and error-prone, and is best avoided.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805

6 years agocleanup: Avoid "lonely" ifs where it makes sense
Florian Müllner [Tue, 20 Aug 2019 02:10:46 +0000 (04:10 +0200)]
cleanup: Avoid "lonely" ifs where it makes sense

If an else block only contains an if statement, the two can be
combined into an if-else block, which cuts down on indentation
and usually helps legibility.

There are exceptions (for instance where the outer if and else
blocks are mirrored), but where it makes sense, change the code
to avoid lonely ifs.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805

6 years agocleanup: Avoid unnecessary braces
Florian Müllner [Tue, 20 Aug 2019 00:51:42 +0000 (02:51 +0200)]
cleanup: Avoid unnecessary braces

Our coding style has always been to avoid braces when all blocks
are single-lines.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805

6 years agoctrlAltTab: Use arrow function for callback
Florian Müllner [Mon, 11 Nov 2019 14:01:00 +0000 (15:01 +0100)]
ctrlAltTab: Use arrow function for callback

This was left over because we are binding a different `this`, but
it is easy enough to replace.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805

6 years agojsParse: Unnest functions
Florian Müllner [Tue, 20 Aug 2019 00:24:28 +0000 (02:24 +0200)]
jsParse: Unnest functions

Nesting functions can be helpful for private helper functions, but
here they are accessing some variables from the outer scope and
shadowing others. Split them out to avoid any ambiguity.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/805

6 years agoallView: Ensure event blocker is reactive before popup is open
Georges Basile Stavracas Neto [Mon, 11 Nov 2019 16:10:53 +0000 (13:10 -0300)]
allView: Ensure event blocker is reactive before popup is open

The event blocker in AllView is responsible for stealing click events
from the icon grid and closing the folder popup. The event blocker is
kept unreactive when no folder popup is visible, and it's made reactive
as a response to the 'open-state-changed' signal.

Using this signal, though, is problematic. When opening an app folder,
the icon grid first opens space for the folder to fit in; during this
period, it's possible to click on another folder icon, and break the
icon grid state.

Make sure the event blocker is reactive immediately after clicking on
a folder icon.

Related: https://gitlab.gnome.org/GNOME/gnome-shell/issues/1470

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/816

6 years agojs: Fix alignment
Florian Müllner [Wed, 6 Nov 2019 11:05:56 +0000 (12:05 +0100)]
js: Fix alignment

The old StBin alignment properties defaulted to MIDDLE, while the
ClutterActor properties use FILL. Fix the resulting fallout by
setting the alignment explicitly where necessary.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/809

6 years agoUpdate Indonesian translation
Andika Triwidada [Sun, 10 Nov 2019 02:35:26 +0000 (02:35 +0000)]
Update Indonesian translation

7 years agostyle: Don't specify font-family
Florian Müllner [Mon, 8 Apr 2019 15:52:33 +0000 (17:52 +0200)]
style: Don't specify font-family

Now that the default font follows the interface setting, stop
overriding it in the CSS.

https://bugzilla.gnome.org/show_bug.cgi?id=688288

7 years agotheme-context: Use interface font instead of hardcoded default
Florian Müllner [Mon, 8 Apr 2019 15:50:08 +0000 (17:50 +0200)]
theme-context: Use interface font instead of hardcoded default

With this, gnome-shell will now follow the interface setting instead
of hardcoding a default font, unless when overwritten by the CSS.

https://bugzilla.gnome.org/show_bug.cgi?id=688288

7 years agost: Add Settings:font-name property
Florian Müllner [Mon, 8 Apr 2019 15:35:06 +0000 (17:35 +0200)]
st: Add Settings:font-name property

This maps to the corresponding interface setting and will be used to
replace the hard-coded font in the CSS.

https://bugzilla.gnome.org/show_bug.cgi?id=688288

7 years agost: Fix a minor leak
Florian Müllner [Sat, 11 May 2019 08:18:00 +0000 (08:18 +0000)]
st: Fix a minor leak

StSetting is used as a singleton, so this leak does not matter in
practise.

Spotted by Jonas Dreßler.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/486

7 years agocalendar: Define EventSourceBase and extend EventSource's
Marco Trevisan (Treviño) [Wed, 29 May 2019 05:52:17 +0000 (07:52 +0200)]
calendar: Define EventSourceBase and extend EventSource's

Objects implementing EventSource should have some mandatory methods and
properties, we can ensure this by defining an EventSourceBase abstract
class.

So inherit EmptyEventSource and DBusEventSource from it making sure that
they implement all the needed methods, using native properties and
replacing the 'notify::*' fake signal emissions with proper object
notifications.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/563

7 years agomodemManager: Define ModemBase GObject class for modems
Marco Trevisan (Treviño) [Wed, 29 May 2019 02:25:57 +0000 (04:25 +0200)]
modemManager: Define ModemBase GObject class for modems

Use GObject based objects for ModemGsm, ModemCdma and BroadbandModem.
This allows to define a base class that we can use to natively define
properties and notify property changes.

We can now remove the "fake" notify signals with proper properties
notifications.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/563

7 years agobackground: Inherit Animation from GnomeDesktop.BGSlideShow
Marco Trevisan (Treviño) [Tue, 28 May 2019 23:21:51 +0000 (01:21 +0200)]
background: Inherit Animation from GnomeDesktop.BGSlideShow

Animation background is just wrapping a native GnomeDesktop BGSlideShow
object, so instead of using composition we can now just inherit from the
native GObject, re-using native properties when possible, and avoiding
to keep an extra wrapper to the bg file.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/563

7 years agokeyring: Inherit KeyringPrompter from Gcr.SystemPrompter
Marco Trevisan (Treviño) [Tue, 28 May 2019 21:07:51 +0000 (23:07 +0200)]
keyring: Inherit KeyringPrompter from Gcr.SystemPrompter

Keyring is just a simple wrapper to a Gcr.SystemPrompter object, so use
inheritance instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/563

7 years agopolkitAgent: Inherit AuthenticationAgent from Shell.PolkitAuthenticationAgent
Marco Trevisan (Treviño) [Tue, 28 May 2019 20:58:35 +0000 (22:58 +0200)]
polkitAgent: Inherit AuthenticationAgent from Shell.PolkitAuthenticationAgent

AuthenticationAgent is just a wrapper of Shell's PolkitAuthenticationAgent, so
instead of using composition we can simply extend the base GObject.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/563

7 years agowindowManager: Complete interrupted size change effects
Florian Müllner [Fri, 8 Nov 2019 17:22:40 +0000 (18:22 +0100)]
windowManager: Complete interrupted size change effects

Resizing effects are more finicky as other effects, as the actual
animation is delayed until we receive the ::size-changed signal.

However that signal may never be emitted if the window is destroyed
just after starting the size-change effect, in which case the effect
is never completed, blocking mutter from destroying the corresponding
window actor.

Address this by tracking when a resize effect is pending, and complete
the effect when appropriate.

https://gitlab.gnome.org/GNOME/mutter/issues/655
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/815

7 years agowindowManager: Use Sets to track ongoing effects
Florian Müllner [Fri, 8 Nov 2019 17:00:05 +0000 (18:00 +0100)]
windowManager: Use Sets to track ongoing effects

We only care whether an effect is ongoing for an actor, not about
any particular order. Sets are more convenient than arrays in that
case, so use them instead.

https://gitlab.gnome.org/GNOME/mutter/issues/655
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/815

7 years agoinputMethod: Compare ibus context before processing key event result
Carlos Garnacho [Thu, 7 Nov 2019 18:06:15 +0000 (19:06 +0100)]
inputMethod: Compare ibus context before processing key event result

In the xwayland-on-demand scenario, it may happen that Xwayland is
shutdown (causing a restart of ibus-daemon to drop ibus-x11) while
we are typing.

If we have a bit of bad luck, this will cause the IBusInputContext
to be disposed (due to its bus "closing") at a time when we have
an ibus_input_context_process_key_event_async() request on the fly.

As the object is disposed in between this would tickle JS (rightfully
complaining that it's been disposed under its feet) and make us pass
an actually NULL IBusInputContext to the corresponding _finish()
function (despite the IBusInputContext being still held alive by some
other refs). This will assert and abort in
ibus_input_context_process_key_event_async_finish() then.

To handle this, listen for IBusInputContext::destroy, and reset our
internal state, this way we can compare on the JS side that the
IBusInputContext is indeed an up-to-date one.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/813

7 years agopower: Handle "100% but charging" case
Philip Chimento [Thu, 7 Nov 2019 20:51:28 +0000 (12:51 -0800)]
power: Handle "100% but charging" case

I've observed that UPower can occasionally report a charge level of 100%
while the state is still "charging". This usually doesn't last very long
but it is noticeable because the power icon changes to a "missing icon"
icon. This will handle that rare case correctly.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/814

7 years agoci: Fix checking out mutter on stable branches
Florian Müllner [Wed, 6 Nov 2019 19:54:57 +0000 (20:54 +0100)]
ci: Fix checking out mutter on stable branches

For stable branches, we currently only check out the correct mutter
branch for merge requests. For the regular pipeline, our code to
determine the current shell branch fails because CI runs on a
temporary "pipeline/12345" branch that doesn't exist for mutter.

Switching to the correct gitlab environment variable fixes that.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/811

7 years agoscreenshot: Allow saving to clipboard
Carlos Garnacho [Tue, 5 Nov 2019 23:48:25 +0000 (00:48 +0100)]
screenshot: Allow saving to clipboard

If no target file is specified (i.e. filename is an empty string), the
screenshot will be stored on the clipboard instead.

https://gitlab.gnome.org/GNOME/mutter/issues/789
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/810

7 years agoshell: Make screenshot API stream based
Carlos Garnacho [Tue, 5 Nov 2019 23:46:41 +0000 (00:46 +0100)]
shell: Make screenshot API stream based

Instead of dealing with filenames, make the low-level API use streams
so the target remains generic.

This so far means JS code now determines the appropriate filename to
use for storing the screenshot, but will be used in other ways in
future commits.

https://gitlab.gnome.org/GNOME/mutter/issues/789
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/810

7 years agost: Add StClipboard method to set arbitrary clipboard content
Carlos Garnacho [Tue, 5 Nov 2019 23:40:17 +0000 (00:40 +0100)]
st: Add StClipboard method to set arbitrary clipboard content

This complements the current text-based API.

https://gitlab.gnome.org/GNOME/mutter/issues/789
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/810

7 years agoshell: Remove format_date() utility function
Florian Müllner [Tue, 10 Sep 2019 03:12:14 +0000 (05:12 +0200)]
shell: Remove format_date() utility function

It is now unused.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/807

7 years agoenvironment: Reimplement Date.toLocaleFormat() override
Florian Müllner [Tue, 10 Sep 2019 03:10:01 +0000 (05:10 +0200)]
environment: Reimplement Date.toLocaleFormat() override

Now that we no longer go through GTimeVal to convert from Date to
GDateTime, there is no more reason for using a C helper function.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/807

7 years agoenvironment: Stop adding child_set() to layout managers
Florian Müllner [Tue, 5 Nov 2019 23:08:04 +0000 (00:08 +0100)]
environment: Stop adding child_set() to layout managers

We no longer use any layout managers that use custom child properties
instead of the generic Clutter.Actor properties, so this override
is completely unused.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/808

7 years agoenvironment: Stop monkey-patching Clutter.TableLayout
Florian Müllner [Tue, 5 Nov 2019 23:05:38 +0000 (00:05 +0100)]
environment: Stop monkey-patching Clutter.TableLayout

It's not used for anything anymore, and may well end up being removed.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/808

7 years agocleanup: Use non-deprecated key symbols
Florian Müllner [Tue, 5 Nov 2019 19:37:28 +0000 (20:37 +0100)]
cleanup: Use non-deprecated key symbols

Clutter originally cluttered its namespace with key symbols, before
prefixing all symbols with KEY. We still use the unprefixed symbols
occasionally, replace them so mutter can drop the deprecated symbols.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/808

7 years agocleanup: Replace deprecated lower/raise calls
Florian Müllner [Tue, 5 Nov 2019 19:17:19 +0000 (20:17 +0100)]
cleanup: Replace deprecated lower/raise calls

Those methods have been deprecated for a long time, so
move to the drop-in replacement.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/808

7 years agowindowManager: Stop using Clutter.Actor.prototype.reparent()
Florian Müllner [Tue, 5 Nov 2019 18:35:41 +0000 (19:35 +0100)]
windowManager: Stop using Clutter.Actor.prototype.reparent()

It has been deprecated for ages, and is about to be dropped from mutter.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/808

7 years agocalendar: Use Clutter.GridLayout
Florian Müllner [Fri, 20 Jun 2014 14:23:32 +0000 (16:23 +0200)]
calendar: Use Clutter.GridLayout

Clutter.TableLayout has been deprecated, so move to the recommended
replacement.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/808

7 years agopolkitAgent: Use a timeout for resetting the dialog
Jonas Dreßler [Sun, 23 Jun 2019 14:32:29 +0000 (16:32 +0200)]
polkitAgent: Use a timeout for resetting the dialog

Since polkit takes a few milliseconds from initiating the session to
emitting the "request" signal, don't introduce visual distraction by
hiding the password entry and showing it again a few ms later.

So start a timeout of 200 ms when we destroy a session and if no session
request (i.e. a request for a password-authentication) happened during
this timeout, hide the password entry.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/788

7 years agopolkitAgent: Reset dialog to defaults after cancelling polkit session
Jonas Dreßler [Sun, 23 Jun 2019 14:33:20 +0000 (16:33 +0200)]
polkitAgent: Reset dialog to defaults after cancelling polkit session

Since we don't know if polkit/PAM will request a password (emitting the
"request" signal) or use another authentication method like a
fingerprint after the current authentication failed, hide the password
field and make the "Authenticate" button insensitive after cancelling
the session, just like we do when creating the dialog.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/788

7 years agopolkitAgent: Make authenticate button insensitive if password is empty
Jonas Dreßler [Mon, 24 Jun 2019 10:36:47 +0000 (12:36 +0200)]
polkitAgent: Make authenticate button insensitive if password is empty

According to the mockups, make the polkit dialogs "Authenticate" button
insensitive and don't respond to pressing the enter key if no password
is supplied.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/788

7 years agopolkitAgent: Only set key focus to password entry after opening dialog
Jonas Dreßler [Mon, 24 Jun 2019 08:57:24 +0000 (10:57 +0200)]
polkitAgent: Only set key focus to password entry after opening dialog

Set the key focus to the password field only after we got a request
(and therefore know that a password is requested) instead of using
`setInitialKeyFocus()`. This way we don't try to focus the password
field by default if we aren't showing it (e.g. in case the user has no
password or is using fingerprint login).

Also we have to move the call to `grab_key_focus()` to happen after
`_ensureOpen()`, because otherwise the ModalDialog will set the focus to
one of the buttons while opening itself.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/788

7 years agopolkitAgent: Also show user avatar for root user
Jonas Dreßler [Sun, 23 Jun 2019 10:15:12 +0000 (12:15 +0200)]
polkitAgent: Also show user avatar for root user

Show the user avatar for all users, including the root user. The root
user will always have the generic avatar, but it looks more consistent
than showing no avatar at all.

This way we also don't have to worry about the spacing introduced by the
polkit-dialog-user-layout CSS class, which would give the
"Administrator" label a small offset to the left.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/788

7 years agopolkitAgent: Update user name on user changes
Jonas Dreßler [Sun, 23 Jun 2019 09:52:54 +0000 (11:52 +0200)]
polkitAgent: Update user name on user changes

Right now we only update the user avatar on the user-changed signal, but
since we also display the users real name we should also update that if
the user changes.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/788

7 years agopolkitAgent: Fix a typo of a signal name
Jonas Dreßler [Sun, 23 Jun 2019 09:40:42 +0000 (11:40 +0200)]
polkitAgent: Fix a typo of a signal name

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/788

7 years agoUpdated Spanish translation
Daniel Mustieles [Tue, 5 Nov 2019 14:38:42 +0000 (15:38 +0100)]
Updated Spanish translation

7 years agosystem: Replace action icons with regular menu items
Florian Müllner [Tue, 15 Oct 2019 18:51:33 +0000 (20:51 +0200)]
system: Replace action icons with regular menu items

Besides making the menu a bit less special, it allows us to fit both
shutdown and suspend actions without any hidden alt-key Easter eggs.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/270

7 years agoaltTab: Use correct actor in label height computation
Florian Müllner [Tue, 5 Nov 2019 01:36:38 +0000 (02:36 +0100)]
altTab: Use correct actor in label height computation

Commit f2bd39b20 removed an intermediate bin, and now we use the
thumbnail bin instead of the label actor to compute the label
height, whoops.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/804

7 years agost: Track stylesheet changes on the StThemeContext
Carlos Garnacho [Thu, 24 Oct 2019 12:03:12 +0000 (14:03 +0200)]
st: Track stylesheet changes on the StThemeContext

Instead of every individual StThemeNode. There are essentially two kinds
of theme nodes: Those we create for lookups, and those interned by the
theme context and used by StWidgets. Listening to the signal on the former
is pointless as they are short lived and not meant to be really used for
drawing. So it is only essential to track stylesheet changes in those we
intern for later use.

This change does precisely that, it lets the StThemeContext track the
stylesheet changes and let all known theme nodes reset their state for
it.

The internal array holding all connected handlers for this signal in glib
was about the biggest single allocation made in gnome-shell, as interned
theme nodes nodes are around the 4 to 5 digit numbers. This essentially
makes it disappear.

This however means that widgets that are explicitly set a theme through
st_widget_set_theme() don't get their theme node implicitly updated.
There's little reasons to use that API, so perhaps this is an acceptable
tradeoff.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/779

7 years agost: Drop StWidget theme overriding API
Carlos Garnacho [Tue, 5 Nov 2019 10:45:36 +0000 (11:45 +0100)]
st: Drop StWidget theme overriding API

A StWidget could get its style from a) a theme set in the StThemeContext,
and b) directly through it's ::theme property. Generally, overriding CSS
through the latter cannot be recommended as it loses any connection with
the global theme (eg. the ones you get through selector specificity).

It sounds a bit too powerful and pervasive, there's no use for it in
gnome-shell and doesn't look like something that could be recommended on
extensions. So, just drop this piece of API.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/779

7 years agocalendar-server: Uses wrong timezone for event times
Milan Crha [Tue, 5 Nov 2019 11:07:40 +0000 (12:07 +0100)]
calendar-server: Uses wrong timezone for event times

The conversion to UTC/time_t time was not using correct timezone.

Closes https://gitlab.gnome.org/GNOME/gnome-shell/issues/1714
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/806

7 years agocleanup: Use more template strings
Florian Müllner [Tue, 29 Oct 2019 18:21:21 +0000 (19:21 +0100)]
cleanup: Use more template strings

xgettext got better at recognizing template strings, so we can
replace more string concatenations. Alas xgettext is still buggy
(surprise, regular expressions are hard), so there are still a
handful of holdouts that prevent us from making a complete switch.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/792

7 years agost: Remove StBin's align properties
Florian Müllner [Thu, 17 Oct 2019 21:27:27 +0000 (23:27 +0200)]
st: Remove StBin's align properties

They are now completely unused, so remove them and stop the confusing
shadowing of ClutterActor's own x/y-align properties.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/803

7 years agojs: Use generic actor properties to align StBin children
Florian Müllner [Thu, 17 Oct 2019 21:40:24 +0000 (23:40 +0200)]
js: Use generic actor properties to align StBin children

StBin's fill/align properties are now no-ops; get back the intended
child allocation by setting the corresponding x/y-align on the child.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/803

7 years agost: Remove st_get_align_factor() utility method
Florian Müllner [Thu, 17 Oct 2019 21:29:06 +0000 (23:29 +0200)]
st: Remove st_get_align_factor() utility method

It is now unused.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/803

7 years agost/bin: Use child's align properties
Florian Müllner [Thu, 17 Oct 2019 21:27:27 +0000 (23:27 +0200)]
st/bin: Use child's align properties

By now, all containers and layout managers except StBin (and its
subclasses) use the generic ClutterActor expand/align properties
to control how their children are laid out.

This is particularly confusing as two or the properties StBin uses
for layout - x-align and y-align - shadow the generic ClutterActor
ones, but work very differently: They use a different enum and
determine how the bin lays out its child, instead of how the bin
is laid out by its parent.

Address this by deprecating the StBin properties and using the same
generic ClutterActor properties as everyone else.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/803

7 years agost: Deprecate StBoxLayout child properties
Florian Müllner [Wed, 23 Oct 2019 13:15:42 +0000 (15:15 +0200)]
st: Deprecate StBoxLayout child properties

We are no longer using them, and so shouldn't anyone else :-)

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/780

7 years agojs: Replace child properties
Florian Müllner [Mon, 21 Oct 2019 18:44:00 +0000 (20:44 +0200)]
js: Replace child properties

Every since commit aa394754, StBoxLayout has supported ClutterActor's
expand/align properties in addition to the container-specific child
properties. Given that that's the only container left with a special
child meta, it's time to fully embrace the generic properties (and
eventually remove the child meta).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/780

7 years agopadOsd: Add missing 'closed' signal
Carlos Garnacho [Fri, 1 Nov 2019 19:01:31 +0000 (20:01 +0100)]
padOsd: Add missing 'closed' signal

This wasn't added on the GObject-ification in commit c4c5c4fd5c. This
introduced warnings and misbehaviors when closing the dialog. (Eg.
pressing the "show OSD" pad action would show stack different dialogs
on top each other).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/800

7 years agolayout: Drop no-clear-hint code
Carlos Garnacho [Fri, 1 Nov 2019 11:21:19 +0000 (12:21 +0100)]
layout: Drop no-clear-hint code

Mutter is doing the right thing by default, we no longer need this.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/798

7 years agoappDisplay: Check instanceof AppIcon using constructor inside the class
Jonas Dreßler [Tue, 29 Oct 2019 22:47:55 +0000 (23:47 +0100)]
appDisplay: Check instanceof AppIcon using constructor inside the class

It seems like some recent change (maybe the move to a ClutterActor
subclass for AppIcon) broke the check whether the drag source is an
instance of AppIcon. While the drag source indeed is an AppIcon and
everything else works correctly, the check still returns false, which
breaks the creation of new folders using DnD.

Theoretically it makes sense that this doesn't work, because we're
assigning AppIcon using `var AppIcon =` and that will only get set after
`GObject.register_class()` finished, so accessing `AppIcon` inside that
function seems risky and is probably wrong.

Fix this by comparing to `this.constructor` instead of `AppIcon`, which
works fine and we know for sure exists at this point.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/794

7 years agopo: Sort LINGUAS
Will Thompson [Thu, 31 Oct 2019 09:42:10 +0000 (09:42 +0000)]
po: Sort LINGUAS

In Endless, we add support for a number of additional languages. Keeping
this file sorted makes it easier to rebase the patch which does this. No
functional change.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/797

7 years agocleanup: Use (un)block_signal_handler() convenience wrapper
Florian Müllner [Wed, 30 Oct 2019 17:11:56 +0000 (18:11 +0100)]
cleanup: Use (un)block_signal_handler() convenience wrapper

We now depend on a gjs version that is guaranteed to provide those
more idiomatic wrappers, so use them instead of the clunkier static
methods.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/795

7 years agoci: Run tests through dbus-run-session
Florian Müllner [Wed, 30 Oct 2019 18:15:26 +0000 (19:15 +0100)]
ci: Run tests through dbus-run-session

Something changed recently in the test initialization code, causing
the test-theme invocation to fail. Make sure there is a D-Bus session
by running the tests through dbus-run-session to get them going again.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/796

7 years agost/scroll-view: Remove scrollbars references on dispose
Marco Trevisan (Treviño) [Fri, 3 Aug 2018 17:06:47 +0000 (19:06 +0200)]
st/scroll-view: Remove scrollbars references on dispose

As we're destroying the scrollbars on destruction, we should remove any
reference of it, not to cause multiple-calls to disposal to unreference them
again.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/190

7 years agompris: Hide notification when !CanPlay, instead of closing player
Philip Chimento [Tue, 29 Oct 2019 00:11:40 +0000 (17:11 -0700)]
mpris: Hide notification when !CanPlay, instead of closing player

I have observed a client in the wild (Chromium again) set CanPlay to
false momentarily while it is loading the next song. Previously, the
code would close the player proxy in that case, meaning that after
playing one track, the MPRIS message would disappear and never come
back.

However, I think this use of CanPlay, while apparently not usual, is not
incorrect according to the spec. We should hide the message instead of
closing the player proxy.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1362

7 years agompris: Validate received data against the expected types from the spec
Philip Chimento [Tue, 29 Oct 2019 00:06:40 +0000 (17:06 -0700)]
mpris: Validate received data against the expected types from the spec

In the wild we have buggy clients (notably Chromium 77 and earlier) that
send metadata with the wrong types. Previously, this would throw an
exception and prevent the MPRIS information from showing up in the
message list.

This changes the code to check if any incoming metadata is of the type
it is expected to be, and logs a warning if not, then continues on with
a default value.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1362

7 years agojs: Use Gjs GTypeName computation for all classes
Marco Trevisan (Treviño) [Mon, 28 Oct 2019 18:35:33 +0000 (19:35 +0100)]
js: Use Gjs GTypeName computation for all classes

As per previous commit we can remove the explicit GTypeName definitions
and use gjs auto computation for all the GObject registered classes.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/790

7 years agoenvironment: Use gjs smart GObject GTypeName computation
Marco Trevisan (Treviño) [Mon, 28 Oct 2019 17:44:24 +0000 (18:44 +0100)]
environment: Use gjs smart GObject GTypeName computation

Make gjs to compute the GType name for registered GObject-derived
classes using the file basename and the first directory name, so that we
can avoid name clashing, and ensure that no extension will break the
shell by registering a name that is already used (by the shell or by any
other extension).

This requires gjs commit 02568304 [1] that will be part of release 3.35.2,
so bump the required version as gjs does post-release version bumps.

[1] https://gitlab.gnome.org/GNOME/gjs/merge_requests/337

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/790

7 years agoci: Switch to mutter's v3 docker image
Florian Müllner [Tue, 29 Oct 2019 01:09:46 +0000 (02:09 +0100)]
ci: Switch to mutter's v3 docker image

As we start depending on newer stuff, switch to an image that is based
on a more recent base image to minimize the pain a bit.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/792

7 years agopadOsd: Work around xgettext confusion
Florian Müllner [Tue, 29 Oct 2019 13:13:38 +0000 (14:13 +0100)]
padOsd: Work around xgettext confusion

Similar to the previous work-around, xgettext gets thrown off by
embedded quotes in template strings, in particular where a template
"breaks up" a pair of quotes.

Throw in some more comments to make xgettext happy, but whoever makes
the gettext toolchain not depend on fragile regular expressions will
be drowned in beverages of their choice ...

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/792

7 years agoextensionPrefs: Trick xgettext into accepting odd number of backticks
Florian Müllner [Tue, 29 Oct 2019 13:01:07 +0000 (14:01 +0100)]
extensionPrefs: Trick xgettext into accepting odd number of backticks

Xgettext learned about template strings now, which is good. However
it's still buggy, so instead of the "classic" xgettext issue with
backticks, we now have exciting new issues to find work-arounds for.

One issue is that it doesn't detect backticks inside string constants
as regular characters, so having an odd number of backticks throws off
its regex.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/792

7 years agooverview: Set searchEntry offscreen-redirected always
Daniel van Vugt [Wed, 23 Oct 2019 04:18:20 +0000 (12:18 +0800)]
overview: Set searchEntry offscreen-redirected always

This corrects weird-looking blending visible as it fades out when the
overview closes. Previously the entry's dark background would drown out
the text as it fades out, but now they maintain a consistent contrast ratio
during the fade.

There's no noticeable change in performance, but in theory it should be
faster as text entries don't change at full frame rate. So stage redraws
will usually have a cached searchEntry drawn and require less effort.
Though the main purpose here is to correct the appearance.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/778

7 years agocloseDialog: Fix dialog size when using geometry scaling
Jonas Dreßler [Tue, 15 Oct 2019 14:20:09 +0000 (16:20 +0200)]
closeDialog: Fix dialog size when using geometry scaling

The close dialog is added as a child to MetaWindowActor, and, in Wayland
sessions, since commit [1] MetaWindowActor applies a transformation
matrix which scales all it's children using the geometry scale factor.
Now because the dialog actor is not a window (i.e. a MetaSurfaceActor),
but a subclass of StWidget, the scale factor is also applied to the
properties of the dialog by StThemeNode, so we end up applying the
geometry scale twice to the close dialog.

Fix this by applying the inverted scale to the dialog, which leaves the
scaling only to MetaWindowActor. This means we also can't apply a pivot
point other than 0 to the dialog actor, so apply the 0.5-pivot point to
the `_dialog` child of the Dialog class (the actual visible dialog box)
and also perform scaling animations on this child.

[1] https://gitlab.gnome.org/GNOME/mutter/commit/fb9e8768

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/783

7 years agowindowManager: Always reset window actors when animations are cancelled
Jonas Dreßler [Sat, 26 Oct 2019 07:40:40 +0000 (09:40 +0200)]
windowManager: Always reset window actors when animations are cancelled

Remove all transformations from window actors after a window animation
was either cancelled or finished. Right now we only do that if the
transition finished successfully, which seems kind of pointless (it can
probably be historically explained because the callbacks inside the
"kill-window-effects" signal handler are connected to those
`*WindowDone()` functions though and the `*WindowOverwritten()`
functions were only added later in [1]).

This fixes a recent regression where a window animation would get
cancelled and remain stuck by switching workspaces. The regression
probably happened due to different behaviour of the `onOverwritten`
callback of Tweener and the `onStopped` callback of Clutter transitions:
For the workspace-switching animation the window actors get reparented
to a temporary container, which makes Clutter transititons emit
"stopped" (`clutter_actor_remove_child_internal()` stops transitions on
its children), while Tweener would continue the animation.

[1] https://gitlab.gnome.org/GNOME/gnome-shell/commits/6dd302e5ce187d6db9266a7d6c0b94fd37fa46f4

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/784

7 years agopopupMenu: Don't chain up vfuncs if the parent doesn't implement them
Jonas Dreßler [Sun, 27 Oct 2019 21:28:38 +0000 (22:28 +0100)]
popupMenu: Don't chain up vfuncs if the parent doesn't implement them

Some vfuncs like `button_press_event`, `button_release_event` and
`touch_event` don't have handlers in the parent classes of
PopupBaseMenuItem. So don't call those handlers and return the default
Clutter.EVENT_PROPAGATE there.

This fixes a crash of the shell that happens when pressing a mouse
button inside the system popup menu and releasing it above a slider like
the volume slider again.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/787

7 years agopanel: Update window section items on title changes
Florian Müllner [Mon, 28 Oct 2019 11:32:31 +0000 (12:32 +0100)]
panel: Update window section items on title changes

We currently only update the windows section when either the focus app changes,
or when the app's windows change (that is, a window is opened or closed). This
allows the menu item labels to become stale if the window title changes after
one of those events (for example when switching tabs).

Fix this by updating menu items when the corresponding window title changes.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/1830

7 years agoappDisplay: Don't crash if app is missing categories
Philip Chimento [Fri, 25 Oct 2019 22:27:25 +0000 (15:27 -0700)]
appDisplay: Don't crash if app is missing categories

g_desktop_app_info_get_categories() may return null. In that case, the
previous code would fail to create a folder when dragging an app with
no categories onto another app. Instead, simply continue with the next
app info.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/782

7 years agodnd: Skip drag target when its acceptDrop() throws an exception
Philip Chimento [Wed, 23 Oct 2019 00:48:00 +0000 (17:48 -0700)]
dnd: Skip drag target when its acceptDrop() throws an exception

In the case of bugs in a drag target's acceptDrop() function, it may
throw an exception. In the previous code, this would break out of the
loop entirely and never cancel the drag, so the mouse button release
event would be ignored and you would have to press Esc to get out of the
drag.

In this change, if acceptDrop() throws an exception, we log it and move
on to the next parent target instead.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/777